home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / programming / other / flexcat / lib / e30b.sd < prev    next >
Text File  |  1999-04-19  |  2KB  |  118 lines

  1. ##stringtype E
  2. ##shortstrings
  3. /****************************************************************
  4.    This file was created automatically by `%fv'
  5.    from "%f0".
  6.    Do not edit by hand!
  7. ****************************************************************/
  8.  
  9. OPT MODULE
  10.  
  11.  
  12. ->*****
  13. ->** External modules
  14. ->*****
  15. MODULE 'locale' , 'libraries/locale'
  16. MODULE 'utility/tagitem'
  17.  
  18.  
  19. ->*****
  20. ->** Object definitions
  21. ->*****
  22. EXPORT OBJECT fc_type
  23.     PRIVATE
  24.         id    :    LONG
  25.         str    :    LONG
  26. ENDOBJECT
  27.  
  28. EXPORT OBJECT catalog_%b
  29.     PUBLIC
  30.         %i        :    PTR TO fc_type
  31. ENDOBJECT
  32.  
  33.  
  34. ->*****
  35. ->** Global variables
  36. ->*****
  37. DEF cat_%b : PTR TO catalog
  38.  
  39.  
  40. ->*****
  41. ->** Creation procedure for fc_type object
  42. ->*****
  43. PROC create( id , str : PTR TO CHAR ) OF fc_type
  44.  
  45.     self.id := id
  46.     self.str := str
  47.  
  48. ENDPROC
  49.  
  50.  
  51. ->*****
  52. ->** Procedure which returns the correct string according to the catalog
  53. ->*****
  54. PROC getstr() OF fc_type RETURN ( IF cat_%b THEN GetCatalogStr( cat_%b , self.id , self.str ) ELSE self.str )
  55.  
  56.  
  57. ->*****
  58. ->** Creation procedure for catalog_%b object
  59. ->*****
  60. PROC create() OF catalog_%b
  61.  
  62.     DEF fct : PTR TO fc_type
  63.  
  64.     cat_%b := NIL
  65.  
  66.     self.%i := NEW fct.create( %d , %s )
  67.  
  68. ENDPROC
  69.  
  70.  
  71. ->*****
  72. ->** Opening catalog procedure (exported)
  73. ->*****
  74. PROC open( loc = NIL : PTR TO locale , language = NIL : PTR TO CHAR ) OF catalog_%b
  75.  
  76.     DEF tag , tagarg
  77.  
  78.     self.close()
  79.  
  80.     IF ( localebase AND ( cat_%b = NIL ) )
  81.  
  82.         IF language
  83.  
  84.             tag := OC_LANGUAGE
  85.             tagarg := language
  86.  
  87.         ELSE
  88.  
  89.             tag:= TAG_IGNORE
  90.  
  91.         ENDIF
  92.  
  93.         cat_%b := OpenCatalogA( loc , '%b.catalog' ,
  94.                                 [    OC_BUILTINLANGUAGE , %l ,
  95.                                     tag , tagarg ,
  96.                                     OC_VERSION , %v ,
  97.                                     TAG_DONE    ] )
  98.  
  99.     ENDIF
  100.  
  101. ENDPROC
  102.  
  103.  
  104. ->*****
  105. ->** Closing catalog procedure
  106. ->*****
  107. PROC close() OF catalog_%b
  108.  
  109.     IF localebase THEN CloseCatalog( cat_%b )
  110.     cat_%b := NIL
  111.  
  112. ENDPROC
  113.  
  114.  
  115. /****************************************************************
  116.    End of the automatically created part!
  117. ****************************************************************/
  118.